<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Isotope Importer</title>
<style>
	textarea
  {
    width: 100%;
    height: 15em;
  }
</style>
<script src="../../kekule.js?min=false"></script>
	<!--
<script src="../../lan/classes.js"></script>
<script src="../../lan/xmlJsons.js"></script>
<script src="../../utils/kekule.utils.js"></script>
-->
<script src="../kekule.dataUtils.js"></script>
<script src="../kekule.chemicalElementsData.js"></script>
<script src="kekule.isotopeImporter.js"></script>
<script>
	var dest;
	function convert(includeElems)
	{
		var data = document.getElementById('memoSrc').value;
		dest = Kekule.IsotopesImporter.import(data, {'includeElems': includeElems});
		document.getElementById('memoResult').value = dest;
		return dest;
	}
	function convertAll()
	{
		return convert();
	}
	function convertSmallSet()
	{
		return convert(['H', 'He', 'C', 'N', 'O', 'F', 'Si', 'P', 'S', 'Cl', 'Br', 'I']);
	}
</script>
</head>

<body>
<form id="formMain" name="formMain" method="post" action="">
  <fieldset>
    <legend>Source Data</legend>
    <label for="memoSrc"></label>
    <textarea name="memoSrc" id="memoSrc"></textarea>
  </fieldset>
  <fieldset>
    <legend>Converted</legend>
    <label for="memoResult"></label>
    <textarea name="memoResult" id="memoResult"></textarea>
    <div>
    	<input type="button" name="btnConvertAll" id="btnConvertAll" value="Convert All" onclick="convertAll()" />
			<input type="button" name="btnConvertSmallSet" id="btnConvertSmallSet" value="Convert Small Set" onclick="convertSmallSet()" />
    </div>
  </fieldset>
</form>
</body>
</html>
